<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui"
	xmlns:f="http://java.sun.com/jsf/core" template="/template.xhtml">

	<ui:define name="css">
		<h:outputStylesheet library="css" name="estilo.css"></h:outputStylesheet>
	</ui:define>
	<ui:define name="title"> Bidman</ui:define>
	<ui:define name="conteudo">		
		<h:form prependId="false">
			<p:panel header="Editar Fornecedor"
				style="font-size:22px;margin:auto;text-align: center;">
				<h:panelGrid columns="3" style="margin:auto;font-size:12px;">
					<p:outputLabel value="Nome:"
						style="font-weight: bold;color:#404040" />
					<p:inputText id="nome" value="#{usuarioController.usuario.nome}"
						required="true" requiredMessage="Campo Obrigatório"
						validatorMessage="Somente Letras / Digite seu nome completo">
						<f:validateRegex pattern="([\p{L}\s]+)" for="nome" />
					</p:inputText>
					<p:message for="nome" display="text" id="nomeMessage" />
					<p:outputLabel value="CPF:" style="font-weight: bold;color:#404040" />
					<p:inputMask value="#{usuarioController.usuario.cpf}"
						mask="999.999.999-99" required="true"
						requiredMessage="Campo Obrigatório" id="cpf"
						validator="CPFValidate" />
					<p:message for="cpf" display="text" id="cpfMessage" />
					<p:outputLabel value="RG:" style="font-weight: bold;color:#404040" />
					<p:inputMask value="#{usuarioController.usuario.rg}"
						mask="9.999.999" required="true"
						requiredMessage="Campo Obrigatório" id="rg" />
					<p:message for="rg" display="text" id="rgMessage" />
					<p:outputLabel value="E-mail:"
						style="font-weight: bold;color:#404040" />
					<p:inputText value="#{usuarioController.usuario.email}"
						required="true" type="email" requiredMessage="Campo Obrigatório"
						id="email" />
					<p:message for="email" display="text" id="emailMessage" />
					<p:outputLabel value="Telefone:"
						style="font-weight: bold;color:#404040" />
					<p:inputMask value="#{usuarioController.usuario.telefone}"
						requiredMessage="Campo Obrigatório" id="telefone"
						mask="(99)9999-9999" />
					<p:message for="telefone" display="text" id="telefoneMessage" />
					<p:outputLabel value="Senha:"
						style="font-weight: bold;color:#404040" />
					<p:inputText type="password"
						value="#{usuarioController.usuario.senha}" required="true"
						requiredMessage="Campo Obrigatório" id="pass" />
					<p:message for="pass" display="text" id="passMessage" />
					<br />
					<p:column colspan="3">
						<p:commandButton action="#{usuarioController.salvarUsuario}"
							value="Salvar" update="@form" style="width:90px"
							icon="ui-icon-plus" />
						<p:commandButton action="#{usuarioController.cancelar}"
							value="Cancelar" immediate="true" style="width:90px"
							icon="ui-icon-cancel" />
					</p:column>
				</h:panelGrid>
			</p:panel>
		</h:form>
	</ui:define>
</ui:composition>


